//
//  DFKitMarco.h
//  Pods
//
//  Created by rujia chen on 17/4/8.
//
//

#ifndef DFKitMarco_h
#define DFKitMarco_h

#define DF_ONE_PIXEL (1/[UIScreen mainScreen].scale)

#define DF_SCREEN_WIDTH ([UIScreen mainScreen].bounds.size.width)

#define DF_SCREEN_HEIGHT ([UIScreen mainScreen].bounds.size.height)

#define DF_SCREEN_SCALE ([UIScreen mainScreen].scale)

NS_INLINE UIView *DFMakeViewWithBackgroundColor(UIColor *backgroundColor) {
    UIView *view = [[UIView alloc] init];
    view.backgroundColor = backgroundColor;
    return view;
}

NS_INLINE UILabel *DFMakeLabel(NSString *text, UIColor *textColor, UIFont *font) {
    UILabel *label = [[UILabel alloc] init];
    label.text = text;
    label.textColor = textColor;
    label.font = font;
    return label;
}

NS_INLINE UIButton *DFMakeButton(NSString *text, UIImage *image, UIColor *textColor, UIFont *font, UIButtonType type) {
    UIButton *button = [UIButton buttonWithType:type];
    [button setTitle:text forState:UIControlStateNormal];
    [button setImage:image forState:UIControlStateNormal];
    [button setTitleColor:textColor forState:UIControlStateNormal];
    button.titleLabel.font = font;
    return button;
}

#endif /* DFKitMarco_h */
